//(function($, window, document, undefined) {
//	mui.plusReady(function(){
//		plus.nativeUI.showWaiting();
//开始
var strategy = document.getElementById('strategy1');

$.ajax({
	type: 'get',
	url: httpAdress + '/api/loan/strategy/getstrategy',
	contentType: "application/json; charset=utf-8",
	dataType: 'jsonp',
	jsonp: "callback",
	jsonpCallback: "successCallback",
	success: function(data) {
        
		var mydata = data.list;

//		alert(JSON.stringify(data));
		var str = '';
		for(var i = 0; i < mydata.length; i++) {
			str += '<li class="mui-table-view-cell mui-media listb">' +
				'<a href="'+mydata[i].murl+'">' +
				'<img class="mui-media-object mui-pull-left" src="' + httpAdress + mydata[i].logo + '">' +
				'<div class="text">' +
				'<p class="text_p1"><span class="kind">[' + mydata[i].title + ']</span>' + mydata[i].mtitle + '</p>' +
				'<p class="text_p2"><span class="num">' + mydata[i].reason + '</span><span class="read">人阅读</span></p>' +
				'</div></a></li>';
		}

		strategy.innerHTML = str;
//		for(var k = 0; k < mydata.length; k++) {
//			var lista = document.getElementsByClassName('listb');
//			lista[k].addEventListener('tap', function() {
//				for(var j = 0; j < mydata.length; j++) {
//					if(this == lista[j]) {
//						document.location.href=mydata[j].murl;
//					}
//				}
//			})
//		}
	},
	error: function() {
		mui.toast('加载失败，刷新一下');
		refresh.style.display = 'block';
	}
});
//var userup=localStorage.getItem('userid');
//var arrqq = ['.home.html', '../daikuan/daikuan.html', '../bank/credit_card.html', '../login/login.html'];
//var muitabitem = document.getElementsByClassName('mui-tab-item');
//	function change(o){
//		muitabitem[o].addEventListener('tap',function() {
//			document.location.href = arrqq[o];
//			if(o==3&&userup!==null){
//				document.location.href='../my/my.html';
//			}
//		});
//	}
//	for(var i = 0; i < 4; i++) {
//		change(i);
//	}
//			结束
//	});
//})(window.mui || window, window, document, undefined);